from . import *


# 线程
class Thread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        while 1:
            url = '{}/Service.svc?wsdl'.format(
                get_xml_value('Path')
            )
            try:
                path = Client(url).service.GetImageUrl("", "")
                if path:
                    set_config("local", "file_path", path)
                    time.sleep(4 * 3600)
            except Exception as e:
                print(e)
